<template>
  <div class="container">
    <salaryTopTitle
      @gobackTriser="toSalaryList"
      v-if="wherePage == 'fj'"
      :salaryOperate="salaryOperate"
      :salaryExcel="salaryExcel"
    ></salaryTopTitle>
    <salaryTopTitle @gobackTriser="toSalaryList" v-else></salaryTopTitle>
    <!-- <createSalaryStepJz :activeIndex="activeIndex"></createSalaryStepJz> -->
    <!--支付信息-->
    <div class="mainCon">
      <createSalaryStepJz :activeIndex="activeIndex"></createSalaryStepJz>
      <div class="vessel">
        <p>
          <i class="icon iconfont iconwancheng"></i>
        </p>
        <p class="reportTitle">注意事项</p>
        <p>
          授权成功的次日中午，系统将自动将工资发放到员工工资卡上，请你耐心等待;
        </p>
        <div class="btnContainer">
          <el-button class="commonBut" @click="toSalaryList"
            >返回工资表管理</el-button
          >
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import salaryTopTitle from '@/components/publicCom/salaryTopTitle'
import createSalaryStepJz from '@/components/publicCom/createSalaryStepJz'

export default {
  name: 'onlineAuthorization',
  components: {
    salaryTopTitle,
    createSalaryStepJz,
  },
  data() {
    return {
      activeIndex: 2,
      salaryOperate: 'salaryOperate', //非建工资下载
      salaryExcel: 'salaryExcel', //非建工资模板
      wherePage: '',
    }
  },
  created() {
    this.salaryId = this.$route.query.salaryId
    this.wherePage = this.$route.query.wherePage
  },
  activated() {
    this.salaryId = this.$route.query.salaryId
    this.wherePage = this.$route.query.wherePage
  },
  methods: {
    //返回工资表管理
    toSalaryList() {
      // this.$router.push("/home/salaryDf/companySalaryBatchList");
      if (this.$route.query.wherePage && this.$route.query.wherePage == 'fj') {
        this.$router.push('/home/salary/qySalaryList')
        this.$store.commit('CHANGE_SLIDER_NAME', {
          oldUrl: '/home/salary/qySalaryList',
          newUrl: this.$router.currentRoute.fullPath,
        })
      } else {
        this.$router.push({
          path: '/home/salaryDf/companySalaryBatchList',
          name: 'companySalaryBatchList',
          query: {
            projectId: this.$route.query.projectId,
            // projectName:this.projectName,
          },
        })
        this.$store.commit('CHANGE_SLIDER_NAME', {
          oldUrl: '/home/salaryDf/companySalaryBatchList',
          newUrl: this.$router.currentRoute.fullPath,
        })
      }
    },
  },
}
</script>

<style scoped lang="less">
.mainCon {
  top: 198px;
  color: #666;
  font-size: 14px;
  .vessel {
    text-align: center;
    margin-top: 60px;
    .reportTitle {
      font-size: 28px;
      color: #009588;
      margin: 36px 0;
    }
    .iconwancheng {
      font-size: 124px;
      color: #009588;
    }
    .reportWrap {
      padding: 20px 48px;
      margin: 0 auto;
      width: 700px;
      background: #f5f7fb;
      .secondpa {
        margin: 12px 0;
      }
      .canotPay {
        color: #e02020;
      }
    }
    .numStyle {
      color: #009588;
      font-weight: bold;
    }
    .accountPay {
      color: #f78b00;
      font-weight: bold;
    }
    .btnContainer {
      padding-top: 22px;
      margin-top: 24px;
    }
  }
}
</style>
